package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-16
 * Time: 19:20
 */
//抽象类
abstract class Shape{
    public int a ;
    public static int b;

    public void func(){

    }
    //抽象方法 不能被private,static,final修饰
    public abstract void draw();
}
class Rect extends Shape{
    public void draw(){
        System.out.println("画一个矩形");
    }
    //public abstract void func();
}
class Flower extends Shape{

    @Override
    public void draw() {
        System.out.println("画一朵花");
    }
}
//class A extends Rect{
//
//    @Override
//    public void draw() {
//
//    }
//
//    @Override
//    public void func() {
//
//    }
//}
public class Test {

    public static void main(String[] args) {
        //Shape shape = new Shape();
    }
}
